// 封装本地存储跟读取方法
// 存储
export const SETTOKEN = (token: string) => {
  localStorage.setItem("token", token)
}
// 读取
export const GETTOKEN = () => {
  return localStorage.getItem("token")
}
//
export let SETUSERNAME = (username: string) => {
  localStorage.setItem("username", username)
}
export let GETUSERNAME = () => {
  return localStorage.getItem("username")
}

export let SETIMG = (avatar: string) => {
  localStorage.setItem("avatar", avatar)
}
export let GETIMG = () => {
  return localStorage.getItem("avatar")
}
export let SETtime = (timeone: number) => {
  localStorage.setItem("time", JSON.stringify(timeone)) //这里注意取数是要转换成数字类型
}
export let GETtime = () => {
  return localStorage.getItem("time")
}
